﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SqlCe4Mvc3Application1.Models
{
    public partial class _Settings_ShellParameterRecord : RaisingStudio.Data.Expressions.TableExpression, RaisingStudio.Data.Expressions.IQueryExpression<_Settings_ShellParameterRecord>
    {
        #region Constructor (s) / Destructor
        /// <summary>
        /// Constructor (s) / Destructor.
        /// </summary>
        public _Settings_ShellParameterRecord() : base("Settings_ShellParameterRecord")
        {
        }
        #endregion
        #region Members
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Id = "Id";
        public RaisingStudio.Data.Expressions.ColumnExpression Id { get { return _Id; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Component = "Component";
        public RaisingStudio.Data.Expressions.ColumnExpression Component { get { return _Component; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Name = "Name";
        public RaisingStudio.Data.Expressions.ColumnExpression Name { get { return _Name; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Value = "Value";
        public RaisingStudio.Data.Expressions.ColumnExpression Value { get { return _Value; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _ShellDescriptorRecord_id = "ShellDescriptorRecord_id";
        public RaisingStudio.Data.Expressions.ColumnExpression ShellDescriptorRecord_id { get { return _ShellDescriptorRecord_id; } }

		#endregion

        public static implicit operator RaisingStudio.Data.Expressions.ConditionExpression(_Settings_ShellParameterRecord Settings_ShellParameterRecord)
        {
            return new RaisingStudio.Data.Expressions.ConditionExpression();
        }

        public RaisingStudio.Data.Expressions.ConditionExpression OrderBy(RaisingStudio.Data.Expressions.ColumnExpression columnExpression)
        {
             RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
             return conditionExpression.OrderBy(columnExpression);
        }

        public RaisingStudio.Data.Expressions.ConditionExpression OrderBy(RaisingStudio.Data.Expressions.ColumnExpression columnExpression, RaisingStudio.Data.Expressions.SortingDirection sortingDirection)
        {
            RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
            return conditionExpression.OrderBy(columnExpression, sortingDirection);
        }

        public RaisingStudio.Data.Expressions.ConditionExpression Where(RaisingStudio.Data.Expressions.ExpressionElement expressionElement)
        {
            RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
            return conditionExpression.Where(expressionElement);
        }

        public static implicit operator RaisingStudio.Data.Expressions.ColumnExpressionCollection(_Settings_ShellParameterRecord Settings_ShellParameterRecord)
        {
            return new RaisingStudio.Data.Expressions.ColumnExpressionCollection(Settings_ShellParameterRecord);
        }

        public static implicit operator RaisingStudio.Data.Expressions.ColumnExpression[](_Settings_ShellParameterRecord Settings_ShellParameterRecord)
        {
            return new RaisingStudio.Data.Expressions.ColumnExpression[]
                        {                            
                            Settings_ShellParameterRecord.Id,
                            Settings_ShellParameterRecord.Component,
                            Settings_ShellParameterRecord.Name,
                            Settings_ShellParameterRecord.Value,
                            Settings_ShellParameterRecord.ShellDescriptorRecord_id,
                        };
        }

        public RaisingStudio.Data.Expressions.ColumnExpressionCollection Except(params RaisingStudio.Data.Expressions.ColumnExpression[] columns)
        {
            RaisingStudio.Data.Expressions.ColumnExpressionCollection columnExpressionCollection = this;
            return columnExpressionCollection.Except(columns);
        }

    
        public static implicit operator RaisingStudio.Data.Expressions.QueryExpression<_Settings_ShellParameterRecord>(_Settings_ShellParameterRecord Settings_ShellParameterRecord)
        {
            return new RaisingStudio.Data.Expressions.QueryExpression<_Settings_ShellParameterRecord>(Settings_ShellParameterRecord);
        }


        #region IQueryExpression<_Settings_ShellParameterRecord> 成员

        _Settings_ShellParameterRecord RaisingStudio.Data.Expressions.IQueryExpression<_Settings_ShellParameterRecord>.Value
        {
            get { return Settings_ShellParameterRecord._; }
        }

        #endregion

        #region IQueryExpression 成员

        RaisingStudio.Data.Expressions.TableExpression RaisingStudio.Data.Expressions.IQueryExpression.Table
        {
            get { return this; }
        }

        RaisingStudio.Data.Expressions.ConditionExpression RaisingStudio.Data.Expressions.IQueryExpression.Condition
        {
            get { return this; }
        }

        RaisingStudio.Data.Expressions.ColumnExpressionCollection RaisingStudio.Data.Expressions.IQueryExpression.Columns
        {
            get { return null; }
        }

        #endregion
    }

    partial class Settings_ShellParameterRecord
    {
        #region Members
        public static readonly _Settings_ShellParameterRecord _ = new _Settings_ShellParameterRecord();
		#endregion
    }
}
